//2009/08/15 17:18:48
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class ProfitCalculator
{
public:
    int percent(vector <string> items)
    {
		double total = 0;
		double cost = 0;
		for(int i=0; i<items.size(); i++)
		{
			stringstream s(items[i]);
			double num;
			s >> num;
			cost += num;
			s >> num;
			total += num;
		}
		int res = (cost - total) * 100 / cost; 
		return res;
    }
};
